var snow;

function Snow() {
	this.node;
	this.x;
	this.y;
	this.windDirection;
	this.draw = function(context) {
		this.x = 0;
		this.y = 0;
		
		var text = '&bull;';
		var textColor = '#FFFFFF';
		var textSize = 15;
		
		var textLocationX = 450;
		var textLocationY = 320;
		
		var myNode = document.createElement("div");
		myNode.innerHTML = text;
		myNode.style.width = "12px";
		myNode.style.height = "12px";
		myNode.style.color = textColor;
		myNode.style.position = "absolute";
		
		this.node = myNode;
		
		context.appendChild(this.node);
	};
	
	this.animate = function(context) {
	//	context.removeChild(this.node);
		
		this.y += 5;
		this.x += 5;
		console.log(this.x + ", " + this.y);
		this.node.style.top = this.y + "px";
		this.node.style.left = this.x + "px";
		
	//	context.appendChild(this.node);
	};
}

window.onload = function() {
	alert("init start");
	
//	var context = document.getElementById("canvasArea");
	var context = document.getElementsByTagName("body")[0];
	
	snow = new Snow();
	snow.draw(context);
	
	setInterval(function() { snow.animate(context); console.log("??"); }, 1000);
	
	alert("init ok");
}

